<template>
    <div id="app">
        <div class="all">
            <!--   顶部 -->
            <div class="logo-line">
                <div class="skymoons-logo"></div>
                <div class="name-time">
                    天象互动科技有限公司
                    <span>(更新时间:2020年11月11日)</span>
                </div>
            </div>
            <!--   顶部 -->
            <common-menu @s2b="fadefrom"></common-menu>
            <div class="right-col">
                <transition
                    mode="out-in"
                    :enter-active-class="fadeFromw"
                    :leave-active-class="fadeleave"
                >
                    <router-view></router-view>
                </transition>
            </div>
        </div>
    </div>
</template>
<script>
import commonMenu from './components/Menu.vue'
export default {
    name: 'app',
    data: function () {
        return {
            fadeFromw: '',
            fadeleave: ''
        }
    },
    components: {
        commonMenu
    },
    methods: {
        fadefrom(a) {
            console.log(a)
            if (a) {
                this.fadeFromw = 'animated fadeInUp';
                this.fadeleave = 'animated fadeOutUp';
            } else {
                this.fadeFromw = 'animated fadeInDown';
                this.fadeleave = 'animated fadeOutDown';
            }
        }

    }
}
</script>
<style lang="scss">
.logo-line {
  position: absolute;
  top: 0;
  width: 100%;
  height: 2.375rem;
  background: #776efd;
  z-index: 102;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  line-height: 2.375rem;
  color: #fff;
  font-size: 18px;
  text-align: center;
}
.right-col {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  overflow: hidden;
}
</style>
